import config from '@/config'
import RequestBase from '@/utils/request.js'

const request = new RequestBase(config.baseUrl)
// 查询报警信息详情
export function reqAlarmInformationList(query) {
  return request.get(`/locate-platform/alarm-info/alarm-collector/list`, query)
}

// 处理报警角标
export function getAlarmInfoMsg() {
  return request.get('/locate-platform/alarm-info/alarm-collector/count?enableHandler=0')
}

// 查询报警信息详情
export function reqAlarmInformationDetail(id) {
  return request.get(`/locate-platform/alarm-info/detail/${id}`)
}
// 聚集记录详情
export function reqAggregationEventAlarmDetail(id) {
  return request.get(`/locate-platform/aggregation/event/alarm/detail/${id}`)
}
// 处理报警事件
export function handleWarnEvent({ handlerResult, id }) {
  return request.put(`/locate-platform/aggregation/event/${id}/alarm-record/${id}`, { handlerResult })
}
// 处理报警信息
export function reqAlarmInformationHandle(data) {
  return request.post('/locate-platform/alarm-info/handle', data)
}
